

import { defineStore } from 'pinia'  
 
export const useloginUserStore = defineStore('loginUserInfo', {  
  persist: {
		enabled: true,//开启数据持久化
		strategies: [
		  {
			key: 'userLoginState',//给一个要保存的名称
			storage: sessionStorage,//sessionStorage / localStorage 存储方式
		  }
		]
	  },
  state: () => ({    //data
    //window.sessionStoreage.setItem("userLoginState",)
       "user_id": "",
	   "username": "",
	   "email": "",
	   "mobile": "",
	   "urlList":[] ,//存储当前登录用户允许访问的路由列表
	   "saTokenInfo": {
	           "tokenName": "", //token
	           "tokenValue": "", //1291921729
	           "isLogin": false,
	           "loginId": "",
	           "loginType": "",
	           "tokenTimeout": -1,
	           "sessionTimeout":-1 ,
	           "tokenSessionTimeout": -1,
	           "tokenActiveTimeout": -1,
	           "loginDeviceType": "DEF",
	           "tag": null
	       }
  }), 
  actions: {  //methods
  }, 
   mutations:{ //computed
   }
});

export default{
	
	data:function(){
		return {}
	},
	methods:{},
	computed:{}
	
}